package cn.jx.asc.user.mapper;

import cn.jx.asc.user.pojo.Valve;

import java.util.List;

import java.util.List;


public interface ValveMapper {
    int deleteByPrimaryKey(Integer valveId);

    int insert(Valve valve);

    int insertSelective(Valve valve);

    Valve selectByPrimaryKey(Integer valveId);

    int updateByPrimaryKeySelective(Valve valve);

    int updateByPrimaryKey(Valve valve);

    /**
     * @author LaiWeiXing
     * @date 2018/6/21 9:59
     * @describe 查找该用户下的所有阀门
    */
    List<Valve> selectAllValveByUserId(Integer userId);

    List<Valve> selectValveData();

    /**
     * @author LaiWeiXing
     * @date 2018/6/25 21:50
     * @describe 添加节点
    */
    int insertValve(Valve valve);

    int updateByPrimaryKeySelectiveByGroupId(Valve valve);

    List<Valve> selectValveDataByGroupId(String groupId);

    /**
     * @author LaiWeiXing
     * @date 2018/6/28 11:03
     * @describe 定湿度控制，根据组id更改阀门状态为2
    */
    int updateStateByGroupId(Integer groupId);

    /**
     * @author LaiWeiXing
     * @date 2018/6/28 11:54
     * @describe 根据组id查找该组阀门
    */
    List<Valve> findValveByGroupId(Integer groupId);
}